<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_accounting.js此处编写
 -->
<template>
    <div>

        <view-grid
                   ref="grid" 
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_accounting.js";

    import ViewGrid from "@/components/basic/ViewGrid.vue";
    
    var vueParam = {
        components: {
           
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '账务处理',
                    name: 'Mall_accounting',
                    url: "/Mall_accounting/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"accountingCode":"","amountSettled":"","businessDay":"","customerName":"","debit":"","lender":"","orderNumber":"","origin":"","status":"","qutstandingAmount":"","remarks":"","referenceInformation":"","sign":"","isDelete":"","isAvailable":"","startingTime":"","modifyDate":"","createDate":"","modifyID":"","createID":"","modifier":"","creator":""},
                editFormOptions: [
                                [{"title":"记账代码","required":true,"field":"accountingCode","type":"text"},
                                {"title":"已结金额","required":true,"field":"amountSettled","type":"text"}],
                                [{"title":"营业日","required":true,"field":"businessDay","type":"text"},
                                {"title":"客人姓名","required":true,"field":"customerName","type":"text"}],
                                [{"title":"借方","required":true,"field":"debit","type":"text"},
                                {"title":"贷方","required":true,"field":"lender","type":"text"}],
                                [{"title":"标志","field":"sign","type":"text"},
                                {"title":"订单号","required":true,"field":"orderNumber","type":"text"}],
                                [{"title":"来源地","field":"origin","type":"text"},
                                {"title":"未结金额","field":"qutstandingAmount","type":"text"}],
                                [{"title":"参考信息","field":"referenceInformation","type":"text"},
                                {"title":"状态","field":"status","type":"text"}],
                                [{"title":"发生时间","required":true,"field":"startingTime","type":"startdate"},
                                {"title":"是否可用","required":true,"field":"isAvailable","type":"switch","dataKey":"enable"}]],
                searchFormFields: {"accountingCode":"","customerName":"","debit":"","lender":"",},
                searchFormOptions: [[{"title":"记账代码","field":"accountingCode","type":"text"},{"title":"客人姓名","field":"customerName","type":"text"},{"title":"借方","field":"debit","type":"text"},{"title":"贷方","field":"lender","type":"text"}]],
                columns: [{field:'id',title:'账务表主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'accountingCode',title:'记账代码',type:'string',width:220,align:'left',sortable:true},
                       {field:'amountSettled',title:'已结金额',type:'decimal',width:90,align:'left'},
                       {field:'businessDay',title:'营业日',type:'string',width:220,align:'left'},
                       {field:'customerName',title:'客人姓名',type:'string',width:220,align:'left'},
                       {field:'debit',title:'借方',type:'string',width:220,align:'left'},
                       {field:'lender',title:'贷方',type:'string',width:220,align:'left'},
                       {field:'orderNumber',title:'订单号',type:'int',width:90,align:'left'},
                       {field:'qutstandingAmount',title:'未结金额',type:'decimal',width:90,align:'left'},
                       {field:'sign',title:'标志',type:'string',width:220,align:'left'},
                       {field:'startingTime',title:'发生时间',type:'datetime',width:90,align:'left',sortable:true},
                       {field:'status',title:'状态',type:'string',width:220,align:'left'},
                       {field:'origin',title:'来源地',type:'string',width:220,align:'left'},
                       {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'sbyte',width:90,align:'left'},
                       {field:'isDelete',title:'是否删除',bind: { key: 'enable', data: [] },type:'int',width:90,require:true,align:'left'},
                       {field:'referenceInformation',title:'参考信息',type:'string',width:220,align:'left'},
                       {field:'remarks',title:'备注',type:'string',width:220,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
                     //  {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
                     //  {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                    //    {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare13',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare14',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare15',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                },
                row: {},
                model: false,
            };
        },
         methods:{
             open(row) {
            this.model = true;
          },
         }
    };
    export default vueParam;
</script>
